import Vue from 'vue'
import Router from 'vue-router'
import Hello from '../view/Login.vue'

Vue.use(Router)
/* Layout */
import Layout from '@/layout'
export default new Router({
  routes: [
    {
      path: '/',
      name: 'logon',
      component: Hello
    },
    {
      path: '',
      component: Layout,
      redirect: 'index',
      children: [
        {
          path: 'index',
          component: () => import('../view/index'),
          name: 'Index',
          meta: { title: '首页', icon: 'dashboard', affix: true }
        }
      ]
    },
    {
      path: '/system',
      component: Layout,
      hidden: true,
      redirect: 'procurement',
      children: [
        {
          path: 'procurement',
          component: () => import('../view/system/procurement/index'),
          name: 'procurement',
          meta: { title: '采购管理', icon: 'dashboard' }
        }
      ]
    }
  ]
})